from rest_framework import serializers

from .models import *


class HeroInfoModelSerializer(serializers.ModelSerializer):
    # 隐藏的关系属性需要定义
    hbook_id = serializers.IntegerField()

    class Meta:
        model = HeroInfo
        fields = ['id', 'hname', 'hgender', 'hbook_id']
